home *** CD-ROM | disk | FTP | other *** search
- on stretchSprites
- global gvcHiddenObjs, gvFirstHiddenSprite
- repeat while soundBusy(1)
- repeat with viHidden = 1 to gvcHiddenObjs
- checkForSTOP()
- set vHiddenSprite to gvFirstHiddenSprite + (viHidden - 1)
- set vDance to random(4)
- if vDance = 1 then
- stretchLeft(vHiddenSprite)
- next repeat
- end if
- if vDance = 2 then
- stretchRight(vHiddenSprite)
- next repeat
- end if
- if vDance = 3 then
- stretchUp(vHiddenSprite)
- next repeat
- end if
- if vDance = 4 then
- stretchDown(vHiddenSprite)
- end if
- end repeat
- end repeat
- end
-
- on stretchRight vSprite
- set vOrigW to the width of sprite vSprite
- set vDestH to the stageRight
- set vCurH to the right of sprite vSprite
- set vLeft to the left of sprite vSprite
- set vTop to the top of sprite vSprite
- set vBottom to the bottom of sprite vSprite
- set vIncrement to 10
- set the stretch of sprite vSprite to 1
- set vLoops to 1
- repeat while vCurH < vDestH
- set vCurH to vCurH + (vIncrement * vLoops)
- spriteBox(vSprite, vLeft, vTop, vCurH, vBottom)
- updateStage()
- set vLoops to vLoops + 1
- end repeat
- spriteBox(vSprite, vDestH - vOrigW, vTop, vDestH, vBottom)
- updateStage()
- set the stretch of sprite vSprite to 0
- end
-
- on stretchLeft vSprite
- set vOrigW to the width of sprite vSprite
- set vDestH to the stageLeft
- set vCurH to the left of sprite vSprite
- set vRight to the right of sprite vSprite
- set vTop to the top of sprite vSprite
- set vBottom to the bottom of sprite vSprite
- set vIncrement to 10
- set the stretch of sprite vSprite to 1
- set vLoops to 1
- repeat while vCurH > vDestH
- set vCurH to vCurH - (vIncrement * vLoops)
- spriteBox(vSprite, vCurH, vTop, vRight, vBottom)
- updateStage()
- set vLoops to vLoops + 1
- end repeat
- spriteBox(vSprite, vDestH, vTop, vDestH + vOrigW, vBottom)
- updateStage()
- set the stretch of sprite vSprite to 0
- end
-
- on stretchDown vSprite
- set vOrigH to the height of sprite vSprite
- set vDestV to the stageBottom
- set vLeft to the left of sprite vSprite
- set vRight to the right of sprite vSprite
- set vTop to the top of sprite vSprite
- set vCurV to the bottom of sprite vSprite
- set vIncrement to 5
- set the stretch of sprite vSprite to 1
- set vLoops to 1
- repeat while vCurV < vDestV
- set vCurV to vCurV + (vIncrement * vLoops)
- spriteBox(vSprite, vLeft, vTop, vRight, vCurV)
- updateStage()
- set vLoops to vLoops + 1
- end repeat
- spriteBox(vSprite, vLeft, vDestV - vOrigH, vRight, vDestV)
- updateStage()
- set the stretch of sprite vSprite to 0
- end
-
- on stretchUp vSprite
- set vOrigH to the height of sprite vSprite
- set vDestV to the stageTop
- set vLeft to the left of sprite vSprite
- set vRight to the right of sprite vSprite
- set vBottom to the bottom of sprite vSprite
- set vCurV to the top of sprite vSprite
- set vIncrement to 5
- set the stretch of sprite vSprite to 1
- set vLoops to 1
- repeat while vCurV > vDestV
- set vCurV to vCurV - (vIncrement * vLoops)
- spriteBox(vSprite, vLeft, vCurV, vRight, vBottom)
- updateStage()
- set vLoops to vLoops + 1
- end repeat
- spriteBox(vSprite, vLeft, vDestV, vRight, vDestV + vOrigH)
- updateStage()
- set the stretch of sprite vSprite to 0
- end
-
- on pulseSprites
- global gvcHiddenObjs, gvFirstHiddenSprite
- set vIncrement to 20
- repeat while soundBusy(1)
- repeat with viHidden = 1 to gvcHiddenObjs
- checkForSTOP()
- set vHiddenSprite to gvFirstHiddenSprite + (viHidden - 1)
- set vOrigW to the width of sprite vHiddenSprite
- set vOrigH to the height of sprite vHiddenSprite
- set the stretch of sprite vHiddenSprite to 1
- repeat with vPulses = 1 to 5
- set the width of sprite vHiddenSprite to vOrigW + (vIncrement * vPulses)
- set the height of sprite vHiddenSprite to vOrigH + (vIncrement * vPulses)
- updateStage()
- end repeat
- repeat with vPulses = 1 to 5
- set the width of sprite vHiddenSprite to vOrigW + (vIncrement * (6 - vPulses))
- set the height of sprite vHiddenSprite to vOrigH + (vIncrement * (6 - vPulses))
- updateStage()
- end repeat
- set the width of sprite vHiddenSprite to vOrigW
- set the height of sprite vHiddenSprite to vOrigH
- updateStage()
- set the stretch of sprite vHiddenSprite to 0
- end repeat
- end repeat
- end
-
- on colorSprites
- global gvcHiddenObjs, gvFirstHiddenSprite, gvBackSprite, MATTE, TRANS
- set vaColors to fArray(mnew, 6)
- vaColors(mput, 1, 5)
- vaColors(mput, 2, 35)
- vaColors(mput, 3, 67)
- vaColors(mput, 4, 180)
- vaColors(mput, 5, 185)
- vaColors(mput, 6, 235)
- repeat while soundBusy(1)
- repeat with viHidden = 1 to gvcHiddenObjs
- checkForSTOP()
- set vHiddenSprite to gvFirstHiddenSprite + (viHidden - 1)
- set the ink of sprite vHiddenSprite to MATTE
- set the foreColor of sprite vHiddenSprite to vaColors(mget, random(6))
- updateStage()
- end repeat
- set the foreColor of sprite gvBackSprite to vaColors(mget, random(6))
- updateStage()
- end repeat
- repeat with viHidden = 1 to gvcHiddenObjs
- set vHiddenSprite to gvFirstHiddenSprite + (viHidden - 1)
- set the foreColor of sprite vHiddenSprite to 255
- set the ink of sprite vHiddenSprite to TRANS
- set the foreColor of sprite gvBackSprite to 255
- end repeat
- vaColors(mdispose)
- end
-
- on fillStageWithSprites
- global gvcHiddenObjs, gvFirstHiddenSprite
- repeat with viHidden = 1 to gvcHiddenObjs
- set vHiddenSprite to gvFirstHiddenSprite + (viHidden - 1)
- set the trails of sprite vHiddenSprite to 1
- end repeat
- repeat while soundBusy(1)
- repeat with viHidden = 1 to gvcHiddenObjs
- checkForSTOP()
- set vHiddenSprite to gvFirstHiddenSprite + (viHidden - 1)
- set vLocH to random(the stageRight - the stageLeft)
- set vLocV to random(the stageBottom - the stageTop)
- set the locH of sprite vHiddenSprite to vLocH
- set the locV of sprite vHiddenSprite to vLocV
- updateStage()
- end repeat
- end repeat
- repeat with viHidden = 1 to gvcHiddenObjs
- set vHiddenSprite to gvFirstHiddenSprite + (viHidden - 1)
- set the trails of sprite vHiddenSprite to 0
- end repeat
- end
-
- on dropSprites
- global gvcHiddenObjs, gvFirstHiddenSprite
- set vDestV to the stageBottom
- repeat with viHidden = 1 to gvcHiddenObjs
- checkForSTOP()
- set vHiddenSprite to gvFirstHiddenSprite + (viHidden - 1)
- set vLoops to 1
- set vfFaster to 0
- repeat while the locV of sprite vHiddenSprite < vDestV
- set the locV of sprite vHiddenSprite to the locV of sprite vHiddenSprite + vLoops
- updateStage()
- if vfFaster then
- set vLoops to vLoops + 1
- set vfFaster to 0
- next repeat
- end if
- set vfFaster to 1
- end repeat
- end repeat
- end
-
- on celebrate
- global gvBackSprite, gvcHiddenObjs, gvFirstHiddenSprite, gvCharSprite, gvcYeaSounds, gvLabelSprite, DIR_SYM, SFX_EXT, IBM
- set the timeoutScript to EMPTY
- set vBWCastName to the name of cast the castNum of sprite gvBackSprite
- if vBWCastName contains "S&F" then
- set vColorCastName to chars(vBWCastName, 1, offset("1", vBWCastName) - 1) & "2.pic"
- else
- set vColorCastName to vBWCastName
- end if
- set vYeaPhrase to random(gvcYeaSounds)
- set vFileName to "SnFYea" & string(vYeaPhrase) & SFX_EXT
- puppetSound(vFileName)
- updateStage()
- animateChar(0, 0)
- set the castNum of sprite gvBackSprite to the number of cast vColorCastName
- updateStage()
- wait(60)
- if soundBusy(1) then
- repeat while soundBusy(1)
- checkForSTOP()
- end repeat
- end if
- set vDance to random(5)
- if the machineType = IBM then
- repeat while vDance = 3
- set vDance to random(5)
- end repeat
- end if
- puppetSound("S&FWin" & vDance & SFX_EXT)
- updateStage()
- if vDance = 1 then
- stretchSprites()
- else
- if vDance = 2 then
- pulseSprites()
- else
- if vDance = 3 then
- colorSprites()
- else
- if vDance = 4 then
- fillStageWithSprites()
- cleanUpStage()
- else
- if vDance = 5 then
- dropSprites()
- end if
- end if
- end if
- end if
- end if
- wait(60)
- end
-